-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port ft90x #1768
Port ft90x #1768
Conversation
The SetLineCoding would fail as host would send the SETUP OUT phase before tinyUSB had setup a transaction for it. ft9xx port would ignore the transfer since there was no valid transaction setup for it. One SETUP data phase packet is cached now.
Correct USB FIFO use for setup data phases (OUT transfers). We cannot stop traffic on the control endpoint so we set a flag and pull data from host when tinyUSB requests it from the USB FIFO. Extend this for all endpoints although currently not required. Rename all instances of ft90x which can apply to ft93x as ft9xx. Add support for the cdc_dual_ports example for ft9xx. Add LED pin definition for board LED in a simple to access place on the Bridgetek MM900EVx boards.
Fix handling of interrupt endpoints. i.e. no ZLPs. Fix the assignation of endpoint types. Add button support for MM900evx boards. On board support do not block for UART input.
$(FT90X_TOOLCHAIN) or even $(TOP) may have spaces. Quote to fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the PR and sorry for the delay. I still haven't set up my PC to actually compile ft90x port yet. Therefore I could only review the code-only, it looks good except for the include of tinyprint.h whose path is missing from family.mk. Please double check.
#define GPIO_ETH_LED1 62 | ||
#define GPIO_REMOTE_WAKEUP_PIN 18 | ||
#define USBD_VBUS_DTC_PIN 3 | ||
#include <tinyprintf.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"tinyprintf.h" is included but its path (INC +=
. I still haven't compile with ft90x yet, please double check to see if path is needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, indeed. Sorry, that file was used for debugging and was included in recent work on the sdk as you found. It's not required in TinyUSB and I've updated the PR to reflect this and tested against the latest code.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no problem at all, this is why including port build in the ci is important. We should try to this in the future. ( I still need to get my PC setup to give this port a try).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
look good now, thank you for the PR and your patient
Describe the PR
This PR will add FT9xx support for more of the USB device examples.
There are fixes for the FT9xx MCU port. Fixes for properly handling back-to-back transactions on the control endpoint as EP0 must always be enabled and receiving - extended to all OUT endpoints. Prevent interrupt endpoints from transmitting ZLPs.
Signal xfer completions correctly (multiple for OUT transfers). Remove unnecessary volatile qualifiers.
Build flags and function names renamed to ft9xx/ft90x/ft93x to indicate target MCU support.
LED and BUTTON definitions added for mm900evxb boards (LED on CN2 pin 4 and BUTTON on CN2 pin 6).
Current device examples tested board_test, cdc_dual_ports, cdc_msc, dynamic_configuration, hid_boot_interface, hid_multiple_interface, msc_dual_lun, uac_headset, webusb_serial.
Update FT9xx SDK to the v2.6.0 release (submodule Bridgetek/ft90x-sdk).
Add an implementation for chip_reboot when hardware library is not included.
Additional Context
A newer version of the FT9xx SDK is available.
More testing has been performed with other examples resulting in bug fixes.
Hardware lacks an LED and a button. This has been implemented using the CN1 connector. Instructions for adding the requried hardware have been added to the readme for the board.